package com.mobilefly.jilinjiexuncha;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.Toast;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends AppCompatActivity {


    @Bind(R.id.rl_teacher)
    RelativeLayout rlTeacher;
    @Bind(R.id.rl_lanuch)
    RelativeLayout rlLanuch;
    @Bind(R.id.rl_school)
    RelativeLayout rlSchool;
    @Bind(R.id.rl_safe)
    RelativeLayout rlSafe;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);


    }

    @OnClick({R.id.rl_teacher, R.id.rl_lanuch, R.id.rl_school,R.id.rl_safe})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.rl_teacher:
                Toast.makeText(MainActivity.this, "1", Toast.LENGTH_SHORT).show();
                break;
            case R.id.rl_lanuch:
                Toast.makeText(MainActivity.this, "2", Toast.LENGTH_SHORT).show();
                break;
            case R.id.rl_school:
                Toast.makeText(MainActivity.this, "3", Toast.LENGTH_SHORT).show();
                break;
            case R.id.rl_safe:
                Toast.makeText(MainActivity.this, "4", Toast.LENGTH_SHORT).show();
                break;
        }
    }

}
